package com.swx.identityservice.service.impl;


import com.swx.identityservice.dtos.role.RoleOutputDto;
import com.swx.identityservice.mapper.ScbpRoleMapper;
import com.swx.identityservice.models.ScbpRole;
import com.swx.identityservice.service.ScbpRoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ScbpRoleServiceImpl extends CrudServiceImpl<ScbpRole> implements ScbpRoleService {

    @Autowired
    private ScbpRoleMapper mapper;

    public List<RoleOutputDto> selectAllWithOutDeleted(
                                                        String dealrole,

                                                        String name,
                                                        String affiliateddept) {
        return mapper.selectAllWithOutDeleted(dealrole, name,affiliateddept);
    }

    @Override
    public List<RoleOutputDto> selectRolesByDeptId(Integer[] id) {
        return mapper.selectRolesByDeptId(id);
    }

    @Override
    public List<ScbpRole> selectAllRoles() {
        return mapper.selectAllRoles();
    }

    @Override
    public int selectCountByDeptId(Integer id) {
        return mapper.selectCountByDeptId(id);
    }

}
